<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
    <!-- 头 -->
    <%@include file="/map/head.jsp" %>
    
    <div id = "right">
    <h1>四川工科院地图查询</h1>
    <input type="text" class="input-text" id="query" name="query" placeholder="请输入需要查询的地点" 
    required/>
     <input type="button" id="button" onclick="query();" value="搜索"/>
    
    <!-- xiashiditu -->
    <div id="map" style="height:90%;width:1000px;background-color: blue;"></div>
    </div>
  </section>
     </body>
     <!-- 地图的js代码 -->
     
        <script type="text/javascript">
     //获取地图对象
     var map = new BMapGL.Map("map");
     //初始化
     var point = new BMapGL.Point(116.404, 39.915);//北京
     
     //初始化
     map.centerAndZoom(point, 13); 
     
     var local = new BMapGL.LocalSearch(map,{
    	 renderOptions:{map:map}
     });
     
     
     //鼠标
     //获取用户的输入信息； js
     function query(){
    	 var data = document.getElementById("query").value;
    	 alert(data);
    	 //开始搜索
    	 local.search(data);
     }
     
     
     
     
     </script>
     
     </html>
